package com.woniuxy.driverschool.controller;

import com.woniuxy.driverschool.entity.Message4D2admin;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author shichen
 * @create 2021-10-14-23:52
 * @description
 */
@ControllerAdvice
public class ControllerExceptionHandler {

    @ExceptionHandler
    public Message4D2admin handlerException(AuthorizationException ex) {
        return new Message4D2admin(null, 403, "没有授权");
    }
}
